package top.carrotguo.weibo.contract;

import com.sina.weibo.sdk.auth.Oauth2AccessToken;

import top.carrotguo.weibo.bean.HomeTimeLine;
import top.carrotguo.weibo.bean.UserInfo;
import top.carrotguo.weibo.bean.UserUidBean;
import top.carrotguo.weibo.retrofit.callback.BaseCallback;
import top.carrotguo.weibo.retrofit.callback.ErrorInfo;
import top.carrotguo.weibo.view.IView;

public interface HomeContract {
    interface Model {
        void getTimeline(Oauth2AccessToken token,int count,int page, final BaseCallback<HomeTimeLine,ErrorInfo> callback);
        void getUserUid(String accessToken, final BaseCallback<String,ErrorInfo> callback);
        void getUserInfo(String access_token, String uid, BaseCallback<UserInfo,ErrorInfo> callback);
    }

    interface View extends IView {
        /*加载更多成功*/
        void showLoadmoreSuccess(HomeTimeLine successInfo);
        /*加载更多失败*/
        void showLoadmoreFail(ErrorInfo errorInfo);
        /*刷新数据成功*/
        void showRefreshSuccess(HomeTimeLine successInfo);
        /*刷新数据失败*/
        void showRefreshFail(ErrorInfo errorInfo);
        /*第一次加载数据成功*/
        void showFirstLoadSuccess(HomeTimeLine successInfo);
        /*第一次加载数据失败*/
        void showFirstLoadFail(ErrorInfo errorInfo);
        void getUserInfoSuccessed(UserInfo successInfo);
    }

    interface Presenter {
        void getTimeline(Oauth2AccessToken token,int count,int page,int loadType);
        void getUserInfo(Oauth2AccessToken token);
    }
}
